const mongoose = require('mongoose');
const { ObjectId } = mongoose.Schema;

/**
 * Export model definition object.
 */
module.exports = {
  name: { type: String, required: true },
  level: { type: Number, required: true },
  originalLevel: { type: Number, required: true },
  ruleSetId: { type: ObjectId, required: true },
  ruleCode: { type: String, required: true },
  externalRuleCode: String,
  hcscliExternalRuleCode: String,
  description: String,
  risk: { type: String, default: '' },
  fixSuggestion: { type: String, default: '' },
  correctExample: { type: String, default: '' },
  wrongExample: { type: String, default: '' },
  orderIndex: { type: Number, required: true },
  inTemplate: { type: Boolean, default: false },
};
